	<table>
		<thead>
			<tr>
				<th width="20"><?php echo form_checkbox(array('name' => 'action_to_all', 'class' => 'check-all')); ?></th>
				<th><?php echo lang('escort_expense_process_label'); ?></th>
				<th><?php echo lang('escort_expense_date_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_expiration_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_payment_date_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_company_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_comment_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_cost_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_expense_paid_label'); ?></th>
				<th width="250"></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="10">
					<div class="inner"><?php $this->load->view('admin/partials/pagination'); ?></div>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($expenses as $expense) : ?>
				<tr>
					<td><?php echo form_checkbox('action_to[]', $expense->id); ?></td>
					<td><?php echo $expense->process_type ; ?></td>
					<td>
						<?php echo format_date($expense->created_date) ; ?>
					</td>
					<td><?php echo format_date($expense->expiration_date); ?></td>
					<td>
						<?php if($expense->paid_date > 0){?>
						<?php echo format_date($expense->paid_date); ?>
						<?php }?>
					</td>
					<td><?php echo $expense->company ; ?></td>
					<td><?php echo $expense->comment ; ?></td>
					<td><?php echo $expense->cost ; ?></td>
					<td>
					<?php
					if($expense->status == 'no'){
						if($expense->expiration_date < time()){
							echo lang('escort_expense_debt_label');
						}else{
							echo lang('escort_expense_pending_label');
						}
					}else{
						echo $expense->status;
					}
					?>
					</td>
					<td>
						<?php echo anchor('admin/be_expense/edit/' . $expense->id, lang('global:edit'), 'class="btn orange edit"'); ?>
						<?php echo anchor('admin/be_expense/delete/' . $expense->id, lang('global:delete'), array('class'=>'confirm btn red delete')); ?>
						<?php
						if($expense->status == 'no'){ 
						?>
						<?php echo anchor('admin/be_expense/mark_as_paid/' . $expense->id, lang('escort_expense_mark_as_paid_label'), array('class'=>'btn orange edit')); ?>
						<?php
						} 
						?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>